'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  //登录
  router.post('/api/login', controller.home.login)
  router.post('/api/register', controller.home.register)

  //渲染
  router.post('/api/redian', controller.home.redian)
  router.post('/api/huati', controller.home.huati)
  router.post('/api/shenghuo', controller.home.shenghuo)
  router.post('/api/shuimian', controller.home.shuimian)
  router.post('/api/nanxing', controller.home.nanxing)
  router.post('/api/drug', controller.home.drug)

  //删除
  router.post('/api/del', controller.home.del)
  router.post('/api/htdel', controller.home.htdel)
  router.post('/api/shdel', controller.home.shdel)
  router.post('/api/smdel', controller.home.smdel)
  router.post('/api/nxdel', controller.home.nxdel)
  router.post('/api/drugdel', controller.home.drugdel)

  //搜索
  router.post('/api/search', controller.home.search)
  router.post('/api/htsearch', controller.home.htsearch)
  router.post('/api/shsearch', controller.home.shsearch)
  router.post('/api/smsearch', controller.home.smsearch)
  router.post('/api/nxsearch', controller.home.nxsearch)
  router.post('/api/drugsearch', controller.home.drugsearch)


  //添加
  router.post('/api/rdadd', controller.home.rdadd)
  router.post('/api/htadd', controller.home.htadd)
  router.post('/api/shadd', controller.home.shadd)
  router.post('/api/smadd', controller.home.smadd)
  router.post('/api/nxadd', controller.home.nxadd)
  router.post('/api/drugadd', controller.home.drugadd)





  //编辑
  router.post('/api/rdset', controller.home.rdset)
  router.post('/api/htset', controller.home.htset)
  router.post('/api/shset', controller.home.shset)
  router.post('/api/smset', controller.home.smset)
  router.post('/api/nxset', controller.home.nxset)
  router.post('/api/drugset', controller.home.drugset)






};
